const initState = {
  count: 0
};

export const reducer = (state = initState, action) => {
  switch (action.type) {
    case 'increament':
      return {
        ...state,
        count: state.count + 1
      };
    case 'decreament':
      return {
        ...state,
        count: state.count - 1
      };
    default:
      return initState;
  }
}